package com.example.pattern.singleton;

/**
 * 懒汉式（线程不安全）
 *
 * @author FM_南风
 * @date 2024/6/22
 */
public class SingletonB {
 private static SingletonB instance;

 private SingletonB() {}

 public static SingletonB getInstance() {
  if (instance == null) {
   instance = new SingletonB();
  }
  return instance;
 }
}